package cn.signalpha.modules.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 购物车实体类
 *
 * @author suguangjun
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("shop_cart")
@ApiModel(value = "Cart对象", description = "购物车")
public class Cart implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
	@JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "商户id")
    private Long sellerId;

    @ApiModelProperty(value = "商品id")
    private Long goodsId;

	@ApiModelProperty(value = "商品类型：1普通商品 2次日达商品")
	private Integer goodsType;

    @ApiModelProperty(value = "商品数量")
    private Integer goodsNum;

    @ApiModelProperty(value = "skuId")
    private Long goodsSkuId;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "0无效 1有效")
    private Integer status;

}
